1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
3 <META http-equiv=
"Content-Type" content=
"text/html; charset=iso-8859-1">
4 <link rel=
"stylesheet" type=
"text/css" href=
"../refdoc.css">
5 <title>Namespace: System.Net.Sockets
</title>
8 <h2>Namespace: System.Net.Sockets
</h2>
11 <p> The
<a href=
"../System.Net.Sockets/System.Net.Sockets.html">System.Net.Sockets
</a> namespace provides a managed implementation of the Windows Sockets (Winsock) interface for developers who need to tightly control access to the network.
</p>
12 <p> The
<a href=
"http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemNetSocketsTCPClientmemberstopic.asp">TCPClient
</a>,
<a href=
"http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemNetSocketsTCPListenermemberstopic.asp">TCPListener
</a>, and
<a href=
"http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemNetSocketsUDPClientmemberstopic.asp">UDPClient
</a> classes encapsulate the details of creating TCP and UDP connections to the Internet.
</p>
15 <h3>Members of System.Net.Sockets Namespace
</h3><b>Classes
</b><dl>
17 <table border=
"1" width=
"90%" style=
"border-collapse: collapse">
19 <th bgcolor=
"#C0C0C0">Class
</th>
20 <th bgcolor=
"#C0C0C0">
25 <td width=
"30%"><a href=
"types/LingerOption.html">class LingerOption
</a></td>
26 <td width=
"60%"> Contains information about a socket's linger time, the amount of time it will remain after closing if data remains to be sent.
30 <td width=
"30%"><a href=
"types/MulticastOption.html">class MulticastOption
</a></td>
31 <td width=
"60%"> Contains IP address values for IP multicast packets.
35 <td width=
"30%"><a href=
"types/NetworkStream.html">class NetworkStream
</a></td>
36 <td width=
"60%"> Provides the underlying stream of data for network access.
40 <td width=
"30%"><a href=
"types/Socket.html">class Socket
</a></td>
41 <td width=
"60%"> Implements the Berkeley sockets interface.
45 <td width=
"30%"><a href=
"types/SocketException.html">class SocketException
</a></td>
46 <td width=
"60%"> The exception that is thrown when a socket error occurs.
50 <td width=
"30%"><a href=
"types/TcpClient.html">class TcpClient
</a></td>
51 <td width=
"60%"> Provides client connections for TCP network services.
55 <td width=
"30%"><a href=
"types/TcpListener.html">class TcpListener
</a></td>
56 <td width=
"60%"> Listens for connections from TCP network clients.
60 <td width=
"30%"><a href=
"types/UdpClient.html">class UdpClient
</a></td>
61 <td width=
"60%"> Provides User Datagram Protocol (UDP) network services.
66 </dl><br><b>Enumerations
</b><dl>
68 <table border=
"1" width=
"90%" style=
"border-collapse: collapse">
70 <th bgcolor=
"#C0C0C0">Enumeration
</th>
71 <th bgcolor=
"#C0C0C0">
76 <td width=
"30%"><a href=
"types/AddressFamily.html">enumeration AddressFamily
</a></td>
77 <td width=
"60%"> Specifies the addressing scheme that an instance of the
<a href=
"../System.Net.Sockets/types/Socket.html">Socket
</a> class can use.
81 <td width=
"30%"><a href=
"types/ProtocolFamily.html">enumeration ProtocolFamily
</a></td>
82 <td width=
"60%"> Specifies the type of protocol that an instance of the
<a href=
"../System.Net.Sockets/types/Socket.html">Socket
</a> class can use.
86 <td width=
"30%"><a href=
"types/ProtocolType.html">enumeration ProtocolType
</a></td>
87 <td width=
"60%"> Specifies the protocols that the
<a href=
"../System.Net.Sockets/types/Socket.html">Socket
</a> class supports.
91 <td width=
"30%"><a href=
"types/SelectMode.html">enumeration SelectMode
</a></td>
92 <td width=
"60%"> Defines the polling modes for the
<a href=
"#Poll(System.Int32,System.Net.Sockets.SelectMode)">Socket.Poll
</a> method.
96 <td width=
"30%"><a href=
"types/SocketFlags.html">enumeration SocketFlags
</a></td>
97 <td width=
"60%"> Provides constant values for socket messages.
101 <td width=
"30%"><a href=
"types/SocketOptionLevel.html">enumeration SocketOptionLevel
</a></td>
102 <td width=
"60%"> Defines socket option levels for the
<a href=
"#SetSocketOption(System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName,System.Int32)">Socket.SetSocketOption
</a> and
<a href=
"#GetSocketOption(System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName)">Socket.GetSocketOption
</a> methods.
106 <td width=
"30%"><a href=
"types/SocketOptionName.html">enumeration SocketOptionName
</a></td>
107 <td width=
"60%"> Defines socket option names for the
<a href=
"../System.Net.Sockets/types/Socket.html">Socket
</a> class.
111 <td width=
"30%"><a href=
"types/SocketShutdown.html">enumeration SocketShutdown
</a></td>
112 <td width=
"60%"> Defines constants used by the
<a href=
"#Shutdown(System.Net.Sockets.SocketShutdown)">Socket.Shutdown
</a> method.
116 <td width=
"30%"><a href=
"types/SocketType.html">enumeration SocketType
</a></td>
117 <td width=
"60%"> Specifies the type of socket an instance of the
<a href=
"../System.Net.Sockets/types/Socket.html">Socket
</a> class represents.
122 </dl><br><b>Namepace hierarchy
</b><br><ul class=
"none">
123 <li><a href=
"../System/types/Object.html">System.Object
</a></li>
125 <li><a href=
"../System/types/Exception.html">System.Exception
</a></li>
127 <li><a href=
"../System/types/SystemException.html">System.SystemException
</a></li>
129 <li><a href=
"../System.Runtime.InteropServices/types/ExternalException.html">System.Runtime.InteropServices.ExternalException
</a></li>
131 <li><a href=
"../System.ComponentModel/types/Win32Exception.html">System.ComponentModel.Win32Exception
</a></li>
133 <li><a href=
"../System.Net.Sockets/types/SocketException.html">System.Net.Sockets.SocketException
</a></li>
140 <li><a href=
"../System/types/MarshalByRefObject.html">System.MarshalByRefObject
</a></li>
142 <li><a href=
"../System.IO/types/Stream.html">System.IO.Stream
</a></li>
144 <li><a href=
"../System.Net.Sockets/types/NetworkStream.html">System.Net.Sockets.NetworkStream
</a></li>
149 <li><a href=
"../System.Net.Sockets/types/LingerOption.html">System.Net.Sockets.LingerOption
</a></li>
152 <li><a href=
"../System.Net.Sockets/types/MulticastOption.html">System.Net.Sockets.MulticastOption
</a></li>
155 <li><a href=
"../System.Net.Sockets/types/Socket.html">System.Net.Sockets.Socket
</a> ---
<a href=
"../System/types/IDisposable.html">System.IDisposable
</a></li>
158 <li><a href=
"../System.Net.Sockets/types/TcpClient.html">System.Net.Sockets.TcpClient
</a> ---
<a href=
"../System/types/IDisposable.html">System.IDisposable
</a></li>
161 <li><a href=
"../System.Net.Sockets/types/TcpListener.html">System.Net.Sockets.TcpListener
</a></li>
164 <li><a href=
"../System.Net.Sockets/types/UdpClient.html">System.Net.Sockets.UdpClient
</a> ---
<a href=
"../System/types/IDisposable.html">System.IDisposable
</a></li>
167 <li><a href=
"../System/types/ValueType.html">System.ValueType
</a></li>
169 <li><a href=
"../System/types/Enum.html">System.Enum
</a></li>
171 <li><a href=
"../System.Net.Sockets/types/AddressFamily.html">System.Net.Sockets.AddressFamily
</a></li>
174 <li><a href=
"../System.Net.Sockets/types/ProtocolFamily.html">System.Net.Sockets.ProtocolFamily
</a></li>
177 <li><a href=
"../System.Net.Sockets/types/ProtocolType.html">System.Net.Sockets.ProtocolType
</a></li>
180 <li><a href=
"../System.Net.Sockets/types/SelectMode.html">System.Net.Sockets.SelectMode
</a></li>
183 <li><a href=
"../System.Net.Sockets/types/SocketFlags.html">System.Net.Sockets.SocketFlags
</a></li>
186 <li><a href=
"../System.Net.Sockets/types/SocketOptionLevel.html">System.Net.Sockets.SocketOptionLevel
</a></li>
189 <li><a href=
"../System.Net.Sockets/types/SocketOptionName.html">System.Net.Sockets.SocketOptionName
</a></li>
192 <li><a href=
"../System.Net.Sockets/types/SocketShutdown.html">System.Net.Sockets.SocketShutdown
</a></li>
195 <li><a href=
"../System.Net.Sockets/types/SocketType.html">System.Net.Sockets.SocketType
</a></li>
199 </ul><br><i><a href=
"../documentation_license.txt">
200 Copyright (c)
2002 Microsoft Corporation. All rights reserved.